| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | // The Vue build version to load with the `import` command |
||
| 32 | api.access = (url) => { |
||
| 33 | return new Promise((resolve, reject) => { |
||
| 34 | // add baseURL to given url |
||
| 35 | url = api.defaults.baseURL + url |
||
| 36 | |||
| 37 | // get yahoo's yql API with url |
||
| 38 | api.get('https://query.yahooapis.com/v1/public/yql?q=SELECT * FROM json WHERE url="' + url + '"&format=json') |
||
| 39 | .then((response) => { |
||
| 40 | response.data = response.data.query.results.json |
||
| 41 | resolve(response) |
||
| 42 | }) |
||
| 43 | .then(reject) |
||
| 44 | }) |
||
| 45 | } |
||
| 46 | |||
| 59 |